package com.example.myapplication;

import android.app.Application;

import mylibrary.global.GlobalConfig;
import mylibrary.utils.LogUtils;
import okhttp3.logging.HttpLoggingInterceptor;

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor(new HttpLoggingInterceptor.Logger() {
            @Override
            public void log(String message) {
                LogUtils.e(message);
            }
        });
        httpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
        GlobalConfig.getInstance()
                .addInterceptors(httpLoggingInterceptor);
    }
}
